<form action="index.php?app=tags&ctl=admin_tags&act=save" id="tag-form" method="POST">
<div class="division">
<table>
    <tr>
        <td>选择商品</td>
        <td><{input type="object" app=b2c object="goods" value="{$tag.goods_id}" name="goods_id" cols="name"  select="radio" vtype="required" }>
        </td>
    </tr>
    <tr>
        <td>小程序商品图片</td>
        <td>
            <span>
            <{assign var=name_spec_image value="spec[spec_value][{$key}][image]"}>
             <span style="" class='edit sel_image'><{input type='image' name=image value=$tag.image}></span>
            </span>
        </td>
    </tr>
    <input type="hidden" name="tags_id" value="<{$tag_id}>">
    <input type="hidden" name="id" value="<{$tag.id}>">
 </table>
</div>
<div class="table-action">
	<button class="btn" type="submit" id="tag-form-submit"><span><span><{t}>保存<{/t}></span></span></button></div>
</form>

<script>
(function(){
	var _form = $('tag-form');
	var btn =$('tag-form-submit');
	//var finder = finderGroup['<{$env.get.finder_id}>'];
	
	_form.store('target',{
		
		onSuccess:function(response){
			var hash_res_obj = JSON.decode(response);
			if (hash_res_obj.success != undefined && hash_res_obj.success != "")
			{
				try{
					var _dialogIns = btn.getParent('.dialog').retrieve('instance');
				}catch(e){}
				
				if(_dialogIns)
				{	
					_dialogIns.close();
				}
			}	
		}
	});
	
})();
		
</script>